home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
netz
/
term
/
extras
/
source
/
term-source.lha
/
EmulationPanel.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-07-01
|
18KB
|
819 lines
/*
** EmulationPanel.c
**
** Editing panel for emulation configuration
**
** Copyright © 1990-1995 by Olaf `Olsen' Barthel
** All Rights Reserved
*/
#include "termGlobal.h"
enum { GAD_USE=1000, GAD_CANCEL, GAD_DEFAULT,
GAD_SCROLL, GAD_JUMP_SCROLL,
GAD_EDITPENS, GAD_STDPENS,
GAD_PAGER,GAD_PAGEGROUP
};
STATIC BOOLEAN __regargs
PenPanel(struct Window *Parent,struct Configuration *Config,WORD Depth)
{
struct LayoutHandle *Handle;
UWORD Pen[16];
UBYTE Attribute[4];
UBYTE Colours[16];
WORD i;
BOOLEAN Result = FALSE;
for(i = 0 ; i < (1L << Depth) ; i++)
Colours[i] = MappedPens[0][i];
CopyMem(Config -> EmulationConfig -> Pens,Pen,sizeof(Pen));
CopyMem(Config -> EmulationConfig -> Attributes,Attribute,sizeof(Attribute));
if(Handle = LT_CreateHandleTags(Parent -> WScreen,
LH_LocaleHook, &LocaleHook,
LH_ExactClone, TRUE,
LH_ExitFlush, FALSE,
TAG_DONE))
{
struct Window *PanelWindow;
LT_New(Handle,
LA_Type, VERTICAL_KIND,
TAG_DONE);
{
LT_New(Handle,
LA_Type, HORIZONTAL_KIND,
TAG_DONE);
{
LT_New(Handle,
LA_Type, VERTICAL_KIND,
LA_LabelID, MSG_PENPANEL_DRAWING_PENS_TXT,
TAG_DONE);
{
LT_New(Handle,
LA_Type, PALETTE_KIND,
LA_LabelText, "_0",
GTPA_Depth, Depth,
GTPA_ColorTable, Colours,
LAPA_SmallPalette, TRUE,
LA_UWORD, &Pen[0],
TAG_DONE);
LT_New(Handle,
LA_Type, PALETTE_KIND,
LA_LabelText, "_1",
GTPA_Depth, Depth,
GTPA_ColorTable, Colours,
LAPA_SmallPalette, TRUE,
LA_UWORD, &Pen[1],
TAG_DONE);
if(Depth > 1)
{
LT_New(Handle,
LA_Type, PALETTE_KIND,
LA_LabelText, "_2",
GTPA_Depth, Depth,
GTPA_ColorTable, Colours,
LAPA_SmallPalette, TRUE,
LA_UWORD, &Pen[2],
TAG_DONE);
LT_New(Handle,
LA_Type, PALETTE_KIND,
LA_LabelText, "_3",
GTPA_Depth, Depth,
GTPA_ColorTable, Colours,
LAPA_SmallPalette, TRUE,
LA_UWORD, &Pen[3],
TAG_DONE);
}
if(Depth > 2)
{
LT_New(Handle,
LA_Type, PALETTE_KIND,
LA_LabelText, "_4",
GTPA_Depth, Depth,
GTPA_ColorTable, Colours,
LAPA_SmallPalette, TRUE,
LA_UWORD, &Pen[4],
TAG_DONE);
LT_New(Handle,
LA_Type, PALETTE_KIND,
LA_LabelText, "_5",
GTPA_Depth, Depth,
GTPA_ColorTable, Colours,
LAPA_SmallPalette, TRUE,
LA_UWORD, &Pen[5],
TAG_DONE);
LT_New(Handle,
LA_Type, PALETTE_KIND,
LA_LabelText, "_6",
GTPA_Depth, Depth,
GTPA_ColorTable, Colours,
LAPA_SmallPalette, TRUE,
LA_UWORD, &Pen[6],
TAG_DONE);
LT_New(Handle,
LA_Type, PALETTE_KIND,
LA_LabelText, "_7",
GTPA_Depth, Depth,
GTPA_ColorTable, Colours,
LAPA_SmallPalette, TRUE,
LA_UWORD, &Pen[7],
TAG_DONE);
}
LT_EndGroup(Handle);
}
LT_New(Handle,
LA_Type, VERTICAL_KIND,
LA_LabelID, MSG_ATTRIBUTES_TXT,
TAG_DONE);
{
LT_New(Handle,
LA_Type, CYCLE_KIND,
LA_LabelID, MSG_ATTRIBUTE1_GAD,
LACY_FirstLabel,MSG_ATTRIBUTE1_GAD,
LACY_LastLabel, MSG_ATTRIBUTE5_GAD,
LA_UBYTE, &Attribute[TEXTATTR_UNDERLINE],
TAG_DONE);
LT_New(Handle,
LA_Type, CYCLE_KIND,
LA_LabelID, MSG_ATTRIBUTE2_GAD,
LACY_FirstLabel,MSG_ATTRIBUTE1_GAD,
LACY_LastLabel, MSG_ATTRIBUTE5_GAD,
LA_UBYTE, &Attribute[TEXTATTR_HIGHLIGHT],
TAG_DONE);
LT_New(Handle,
LA_Type, CYCLE_KIND,
LA_LabelID, MSG_ATTRIBUTE3_GAD,
LACY_FirstLabel,MSG_ATTRIBUTE1_GAD,
LACY_LastLabel, MSG_ATTRIBUTE5_GAD,
LA_UBYTE, &Attribute[TEXTATTR_BLINK],
TAG_DONE);
LT_New(Handle,
LA_Type, CYCLE_KIND,
LA_LabelID, MSG_ATTRIBUTE4_GAD,
LACY_FirstLabel,MSG_ATTRIBUTE1_GAD,
LACY_LastLabel, MSG_ATTRIBUTE5_GAD,
LA_UBYTE, &Attribute[TEXTATTR_INVERSE],
TAG_DONE);
LT_EndGroup(Handle);
}
LT_EndGroup(Handle);
}
LT_New(Handle,
LA_Type,VERTICAL_KIND,
TAG_DONE);
{
LT_New(Handle,
LA_Type, XBAR_KIND,
LAXB_FullSize, TRUE,
TAG_DONE);
LT_EndGroup(Handle);
}
LT_New(Handle,LA_Type,HORIZONTAL_KIND,
LAGR_SameSize, TRUE,
LAGR_Spread, TRUE,
TAG_DONE);
{
LT_New(Handle,
LA_Type, BUTTON_KIND,
LA_LabelID, MSG_GLOBAL_USE_GAD,
LA_ID, GAD_USE,
LABT_ReturnKey, TRUE,
LABT_ExtraFat, TRUE,
TAG_DONE);
LT_New(Handle,
LA_Type, BUTTON_KIND,
LA_LabelID, MSG_GLOBAL_CANCEL_GAD,
LA_ID, GAD_CANCEL,
LABT_EscKey, TRUE,
LABT_ExtraFat, TRUE,
TAG_DONE);
LT_EndGroup(Handle);
}
LT_EndGroup(Handle);
}
if(PanelWindow = LT_Layout(Handle,LocaleString(MSG_PENPANEL_SCREEN_DRAWING_PENS_TXT),NULL,0,0,IDCMP_CLOSEWINDOW,0,
LAWN_HelpHook, &GuideHook,
LAWN_Parent, Window,
WA_DepthGadget, TRUE,
WA_CloseGadget, TRUE,
WA_DragBar, TRUE,
WA_RMBTrap, TRUE,
WA_Activate, TRUE,
TAG_DONE))
{
struct IntuiMessage *Message;
BOOLEAN Done = FALSE;
ULONG MsgClass,
MsgQualifier;
UWORD MsgCode;
struct Gadget *MsgGadget;
PushWindow(PanelWindow);
LT_ShowWindow(Handle,TRUE);
GuideContext(CONTEXT_TEXTPEN_PANEL);
do
{
if(Wait(PORTMASK(PanelWindow -> UserPort) | SIG_BREAK) & SIG_BREAK)
break;
while(Message = (struct IntuiMessage *)GT_GetIMsg(PanelWindow -> UserPort))
{
MsgClass = Message -> Class;
MsgQualifier = Message -> Qualifier;
MsgCode = Message -> Code;
MsgGadget = (struct Gadget *)Message -> IAddress;
GT_ReplyIMsg(Message);
LT_HandleInput(Handle,MsgQualifier,&MsgClass,&MsgCode,&MsgGadget);
if(MsgClass == IDCMP_CLOSEWINDOW)
Done = TRUE;
if(MsgClass == IDCMP_GADGETUP)
{
switch(MsgGadget -> GadgetID)
{
case GAD_USE:
CopyMem(Pen,Config -> EmulationConfig -> Pens,sizeof(Pen));
CopyMem(Attribute,Config -> EmulationConfig -> Attributes,sizeof(Attribute));
Result = Done = TRUE;
break;
case GAD_CANCEL:
Done = TRUE;
break;
}
}
}
}
while(!Done);
PopWindow();
}
LT_DeleteHandle(Handle);
}
return(Result);
}
BYTE __regargs
EmulationPanel(struct Configuration *LocalConfig,BYTE *Default)
{
STATIC LONG PageTitleID[5] =
{
MSG_V36_0034,
MSG_V36_0035,
MSG_V36_0036,
MSG_PENPANEL_DRAWING_PENS_TXT,
-1
};
STATIC BYTE InitialPage = 0;
struct LayoutHandle *Handle;
BYTE Changed = FALSE,
Cancel = FALSE;
BOOL PenChoices;
WORD Depth,
CurrentDepth;
STRPTR PageTitle[5];
LocalizeStringTable(PageTitle,PageTitleID);
SaveConfig(LocalConfig,PrivateConfig);
/* ALWAYS */
{
struct Configuration *Ptr;
if(LocalConfig -> ScreenConfig)
Ptr = LocalConfig;
else
Ptr = Config;
if((Ptr -> ScreenConfig -> UseWorkbench || Ptr -> ScreenConfig -> ShareScreen) && !Kick30)
PenChoices = FALSE;
else
PenChoices = TRUE;
switch(Ptr -> ScreenConfig -> ColourMode)
{
case COLOUR_MONO:
Depth = 1;
break;
case COLOUR_AMIGA:
Depth = 2;
break;
case COLOUR_EIGHT:
Depth = 3;
break;
case COLOUR_SIXTEEN:
Depth = 4;
break;
}
}
switch(Config -> ScreenConfig -> ColourMode)
{
case COLOUR_MONO:
CurrentDepth = 1;
break;
case COLOUR_AMIGA:
CurrentDepth = 2;
break;
case COLOUR_EIGHT:
CurrentDepth = 3;
break;
case COLOUR_SIXTEEN:
CurrentDepth = 4;
break;
}
if(Depth != CurrentDepth || !PenChoices)
{
PageTitle[3] = NULL;
if(InitialPage == 4)
InitialPage = 3;
}
else
PageTitle[4] = NULL;
if(Handle = LT_CreateHandleTags(Window -> WScreen,
LH_LocaleHook, &LocaleHook,
LH_ExactClone, TRUE,
TAG_DONE))
{
struct Window *PanelWindow;
LT_New(Handle,
LA_Type, VERTICAL_KIND,
TAG_DONE);
{
LT_New(Handle,
LA_Type,VERTICAL_KIND,
TAG_DONE);
{
LT_New(Handle,
LA_Type, CYCLE_KIND,
LA_ID, GAD_PAGER,
LA_LabelID, MSG_XFER_PAGE_TXT,
GTCY_Labels, PageTitle,
LACY_AutoPageID,GAD_PAGEGROUP,
LACY_TabKey, TRUE,
LA_BYTE, &InitialPage,
TAG_DONE);
LT_EndGroup(Handle);
}
LT_New(Handle,
LA_Type, VERTICAL_KIND,
LA_ID, GAD_PAGEGROUP,
LAGR_Frame, TRUE,
LAGR_ActivePage,InitialPage,
TAG_DONE);
{
LT_New(Handle,
LA_Type, VERTICAL_KIND,
TAG_DONE);
{
LT_New(Handle,
LA_Type, CYCLE_KIND,
LA_LabelID, MSG_EMULATIONPANEL_CURSOR_KEYS_GAD,
LA_BYTE, &LocalConfig -> EmulationConfig -> CursorMode,
LACY_FirstLabel,MSG_EMULATIONPANEL_STANDARD_MODE_TXT,
LACY_LastLabel, MSG_EMULATIONPANEL_APPLICATION_MODE_TXT,
LA_Chars, 20,
TAG_DONE);
LT_New(Handle,
LA_Type, CHECKBOX_KIND,
LA_LabelID, MSG_LOCK_CURSOR_KEY_MODE_TXT,
LA_BYTE, &LocalConfig -> EmulationConfig -> CursorLocked,
TAG_DONE);
LT_New(Handle,
LA_Type, XBAR_KIND,
TAG_DONE);
LT_New(Handle,
LA_Type, CYCLE_KIND,
LA_LabelID, MSG_EMULATIONPANEL_NUMERIC_KEYPAD_GAD,
LA_BYTE, &LocalConfig -> EmulationConfig -> NumericMode,
LACY_FirstLabel,MSG_EMULATIONPANEL_STANDARD_MODE_TXT,
LACY_LastLabel, MSG_EMULATIONPANEL_APPLICATION_MODE_TXT,
TAG_DONE);
LT_New(Handle,
LA_Type, CHECKBOX_KIND,
LA_LabelID, MSG_V36_1820,
LA_BYTE, &LocalConfig -> EmulationConfig -> KeysLocked,
TAG_DONE);
LT_New(Handle,
LA_Type, XBAR_KIND,
TAG_DONE);
LT_New(Handle,
LA_Type, CHECKBOX_KIND,
LA_LabelID, MSG_EMULATIONPANEL_SWAP_BS_AND_DEL_GAD,
LA_BYTE, &LocalConfig -> EmulationConfig -> SwapBSDelete,
TAG_DONE);
LT_EndGroup(Handle);
}
LT_New(Handle,
LA_Type, HORIZONTAL_KIND,
TAG_DONE);
{
LT_New(Handle,
LA_Type, VERTICAL_KIND,
TAG_DONE);
{
LT_New(Handle,
LA_Type, CHECKBOX_KIND,
LA_LabelID, MSG_EMULATIONPANEL_WRAP_CURSOR_MOVES_GAD,
LA_BYTE, &LocalConfig -> EmulationConfig -> CursorWrap,
TAG_DONE);
LT_New(Handle,
LA_Type, CHECKBOX_KIND,
LA_LabelID, MSG_EMULATIONPANEL_WRAP_CHARACTERS_GAD,
LA_BYTE, &LocalConfig -> EmulationConfig -> LineWrap,
TAG_DONE);
LT_New(Handle,
LA_Type, CHECKBOX_KIND,
LA_LabelID, MSG_LOCK_WRAPPING_GAD,
LA_BYTE, &LocalConfig -> EmulationConfig -> LockWrapping,
TAG_DONE);
LT_New(Handle,
LA_Type, CHECKBOX_KIND,
LA_LabelID, MSG_EMULATIONPANEL_INSERT_MODE_GAD,
LA_BYTE, &LocalConfig -> EmulationConfig -> InsertMode,
TAG_DONE);
LT_New(Handle,
LA_Type, CHECKBOX_KIND,
LA_LabelID, MSG_EMULATIONPANEL_NEW_LINE_MODE_GAD,
LA_BYTE, &LocalConfig -> EmulationConfig -> NewLineMode,
TAG_DONE);
LT_EndGroup(Handle);
}
LT_New(Handle,
LA_Type, VERTICAL_KIND,
TAG_DONE);
{
LT_New(Handle,
LA_Type, CHECKBOX_KIND,
LA_LabelID, MSG_EMULATIONPANEL_CLS_RESETS_CURSOR_GAD,
LA_BYTE, &LocalConfig -> EmulationConfig -> CLSResetsCursor,
TAG_DONE);
LT_New(Handle,
LA_Type, CHECKBOX_KIND,
LA_LabelID, MSG_EMULATIONPANEL_PRINTER_CONTROL_GAD,
LA_BYTE, &LocalConfig -> EmulationConfig -> PrinterEnabled,
TAG_DONE);
LT_New(Handle,
LA_Type, CHECKBOX_KIND,
LA_LabelID, MSG_LOCK_STYLE_GAD,
LA_BYTE, &LocalConfig -> EmulationConfig -> LockStyle,
TAG_DONE);
LT_New(Handle,
LA_Type, CHECKBOX_KIND,
LA_LabelID, MSG_LOCK_COLOUR_GAD,
LA_BYTE, &LocalConfig -> EmulationConfig -> LockColour,
TAG_DONE);
LT_EndGroup(Handle);
}
LT_EndGroup(Handle);
}
LT_New(Handle,
LA_Type, VERTICAL_KIND,
TAG_DONE);
{
/* OBSOLETE!
LT_New(Handle,
LA_Type, CYCLE_KIND,
LA_LabelID, MSG_EMULATIONPANEL_FONT_SCALE_GAD,
LA_BYTE, &LocalConfig -> EmulationConfig -> FontScale,
LACY_FirstLabel,MSG_EMULATIONPANEL_NORMAL_SCALE_TXT,
LACY_LastLabel, MSG_EMULATIONPANEL_HALF_WIDTH_TXT,
LA_Chars, 20,
TAG_DONE);
*/
LT_New(Handle,
LA_Type, CHECKBOX_KIND,
LA_LabelID, MSG_LOCK_FONT_MODE_TXT,
LA_BYTE, &LocalConfig -> EmulationConfig -> FontLocked,
TAG_DONE);
LT_New(Handle,
LA_Type, CYCLE_KIND,
LA_LabelID, MSG_EMULATIONPANEL_SMOOTH_SCROLLING_GAD,
LA_BYTE, &LocalConfig -> EmulationConfig -> ScrollMode,
LACY_FirstLabel,MSG_EMULATIONPANEL_JUMP_TXT,
LACY_LastLabel, MSG_EMULATIONPANEL_SMOOTH_TXT,
TAG_DONE);
LT_New(Handle,
LA_Type, CYCLE_KIND,
LA_LabelID, MSG_EMULATIONPANEL_DESTRUCTIVE_BACKSPACE_GAD,
LA_BYTE, &LocalConfig -> EmulationConfig -> DestructiveBackspace,
LACY_FirstLabel,MSG_DESTRUCTIVE_BS_OFF_TXT,
LACY_LastLabel, MSG_DESTRUCTIVE_BS_SHIFT_TXT,
TAG_DONE);
LT_New(Handle,
LA_Type, STRING_KIND,
LA_LabelID, MSG_EMULATIONPANEL_ANSWERBACK_MESSAGE_GAD,
LA_STRPTR, LocalConfig -> EmulationConfig -> AnswerBack,
GTST_MaxChars, 79,
TAG_DONE);
/*
LT_New(Handle,
LA_Type, INTEGER_KIND,
LA_LabelID, MSG_EMULATIONPANEL_PRESCROLL_TXT,
LA_UBYTE, &LocalConfig -> EmulationConfig -> MaxScroll,
LAIN_Min, 0,
LAIN_Max, 255,
LA_ID, GAD_SCROLL,
LAIN_UseIncrementers, TRUE,
GTIN_MaxChars, 3,
TAG_DONE);
*/
LT_New(Handle,
LA_Type, INTEGER_KIND,
LA_LabelID, MSG_EMULATIONPANEL_JUMP_SCROLL_TXT,
LA_UBYTE, &LocalConfig -> EmulationConfig -> MaxJump,
LAIN_Min, 0,
LAIN_Max, 255,
LA_ID, GAD_JUMP_SCROLL,
LAIN_UseIncrementers, TRUE,
GTIN_MaxChars, 3,
TAG_DONE);
LT_EndGroup(Handle);
}
if(PageTitle[3])
{
LT_New(Handle,
LA_Type, VERTICAL_KIND,
TAG_DONE);
{
LT_New(Handle,
LA_Type, VERTICAL_KIND,
TAG_DONE);
{
LT_New(Handle,
LA_Type, CHECKBOX_KIND,
LA_LabelID, MSG_PENPANEL_STANDARDPENS_TXT,
LA_ID, GAD_STDPENS,
LA_BYTE, &LocalConfig -> EmulationConfig -> UseStandardPens,
TAG_DONE);
LT_EndGroup(Handle);
}
LT_New(Handle,
LA_Type, VERTICAL_KIND,
TAG_DONE);
{
LT_New(Handle,
LA_Type, BUTTON_KIND,
LA_LabelID, MSG_PENPANEL_EDITPENS_TXT,
LA_ID, GAD_EDITPENS,
GA_Disabled, LocalConfig -> EmulationConfig -> UseStandardPens,
TAG_DONE);
LT_EndGroup(Handle);
}
LT_EndGroup(Handle);
}
}
LT_EndGroup(Handle);
}
LT_New(Handle,
LA_Type,VERTICAL_KIND,
TAG_DONE);
{
LT_New(Handle,
LA_Type, XBAR_KIND,
LAXB_FullSize, TRUE,
TAG_DONE);
LT_EndGroup(Handle);
}
LT_New(Handle,LA_Type,HORIZONTAL_KIND,
LAGR_SameSize, TRUE,
LAGR_Spread, TRUE,
TAG_DONE);
{
LT_New(Handle,
LA_Type, BUTTON_KIND,
LA_LabelID, MSG_GLOBAL_USE_GAD,
LA_ID, GAD_USE,
LABT_ReturnKey, TRUE,
LABT_ExtraFat, TRUE,
TAG_DONE);
if(Default)
{
LT_New(Handle,
LA_Type, BUTTON_KIND,
LA_LabelID, MSG_GLOBAL_DEFAULT_GAD,
LA_ID, GAD_DEFAULT,
LABT_ExtraFat, TRUE,
TAG_DONE);
}
LT_New(Handle,
LA_Type, BUTTON_KIND,
LA_LabelID, MSG_GLOBAL_CANCEL_GAD,
LA_ID, GAD_CANCEL,
LABT_EscKey, TRUE,
LABT_ExtraFat, TRUE,
TAG_DONE);
LT_EndGroup(Handle);
}
LT_EndGroup(Handle);
}
if(PanelWindow = LT_Layout(Handle,LocaleString(MSG_EMULATIONPANEL_EMULATION_PREFERENCES_TXT),NULL,0,0,IDCMP_CLOSEWINDOW,0,
LAWN_HelpHook, &GuideHook,
LAWN_Parent, Window,
WA_DepthGadget, TRUE,
WA_CloseGadget, TRUE,
WA_DragBar, TRUE,
WA_RMBTrap, TRUE,
WA_Activate, TRUE,
TAG_DONE))
{
struct IntuiMessage *Message;
BOOLEAN Done = FALSE;
ULONG MsgClass,
MsgQualifier;
UWORD MsgCode;
struct Gadget *MsgGadget;
GuideContext(CONTEXT_EMULATION);
PushWindow(PanelWindow);
LT_ShowWindow(Handle,TRUE);
do
{
if(Wait(PORTMASK(PanelWindow -> UserPort) | SIG_BREAK) & SIG_BREAK)
{
SaveConfig(PrivateConfig,LocalConfig);
break;
}
while(Message = (struct IntuiMessage *)GT_GetIMsg(PanelWindow -> UserPort))
{
MsgClass = Message -> Class;
MsgQualifier = Message -> Qualifier;
MsgCode = Message -> Code;
MsgGadget = (struct Gadget *)Message -> IAddress;
GT_ReplyIMsg(Message);
LT_HandleInput(Handle,MsgQualifier,&MsgClass,&MsgCode,&MsgGadget);
if(MsgClass == IDCMP_CLOSEWINDOW)
{
SaveConfig(PrivateConfig,LocalConfig);
Done = TRUE;
}
if(MsgClass == IDCMP_GADGETUP)
{
switch(MsgGadget -> GadgetID)
{
case GAD_STDPENS:
LT_SetAttributes(Handle,GAD_EDITPENS,
GA_Disabled, MsgCode,
TAG_DONE);
break;
case GAD_EDITPENS:
LT_LockWindow(PanelWindow);
PenPanel(PanelWindow,LocalConfig,Depth);
LT_UnlockWindow(PanelWindow);
break;
case GAD_USE:
LT_UpdateStrings(Handle);
Changed = TRUE;
Done = TRUE;
break;
case GAD_CANCEL:
SaveConfig(PrivateConfig,LocalConfig);
Cancel = Done = TRUE;
break;
case GAD_DEFAULT:
*Default = TRUE;
Done = TRUE;
break;
}
}
}
}
while(!Done);
PopWindow();
}
LT_DeleteHandle(Handle);
}
ScreenSizeStuff();
if(Default)
return((BYTE)(!Cancel));
else
return(Changed);
}